import {ActivatedRoute, Router} from "@angular/router";
import {PageTitleService} from "../pages/page-title.service";
import {BackApiService} from "../pages/back-api.service";
/**
 * Created by aber on 2017/5/17.
 * dummy file
 */

export class SimplePendingTask {
  id: number;
  no: string;
  name: string;
  phone: string;
  address: string;
}


export abstract class Tasks {

  //noinspection JSUnusedGlobalSymbols
  constructor(
    protected _router: Router,
    protected _pageTitle: PageTitleService,
    protected _routerActive: ActivatedRoute,
    protected _backApiService: BackApiService) {

    //noinspection JSUnusedLocalSymbols
    _routerActive.params.subscribe(p => {
      this._pageTitle.title = this.title();
      console.log(this._pageTitle.title);
    })

  }

  abstract title(): string


  navigationToMap(): void {
    this._router.navigate(['/navigation']);
  }

  processTask(id: number): void {
    this._router.navigate(['/pending',id]);
  }

}
